//
//  DefaultExtension.swift
//  GoldStar
//
//  Created by TRS-Mobile on 2025/6/24.
//

import Foundation
import UIKit
import SFSafeSymbols


extension UIImage {
    static func paletteSFSymbolImage(_ sf: SFSymbol) -> UIImage {
        let config = UIImage.SymbolConfiguration(
            paletteColors: [
                UIColor.cyan, // 青色（主层）
                UIColor.sunbeam,
                UIColor.​​lakeBlue
            ]
        )
        return UIImage(systemSymbol: sf, withConfiguration: config)
    }
}

extension UIColor {
    /// 阳光黄（次层）
    static let sunbeam = UIColor(red: 0.95, green: 0.77, blue: 0.06, alpha: 1.0)
    /// 湖水蓝（第三层）
    static let ​​lakeBlue = UIColor(red: 0.20, green: 0.78, blue: 0.64, alpha: 1.0)
}

extension UIView {
    func setCornerRadius(_ radius: CGFloat) {
        layer.cornerRadius = radius
        layer.masksToBounds = true
    }
}
